package Example5;

public class Main {
    public static void main(String[] args) {
        StuObserver stuObserver=new StuObserver();
        TeacherObserver teacherObserver=new TeacherObserver();
        TJUTNewsObservable tjutNewsObservable=new TJUTNewsObservable();
        TJUTNoteObservable tjutNoteObservable=new TJUTNoteObservable();
        tjutNewsObservable.addObserver(stuObserver);
        tjutNewsObservable.addObserver(teacherObserver);

        tjutNoteObservable.addObserver(stuObserver);
        tjutNoteObservable.addObserver(teacherObserver);

        tjutNewsObservable.setNews("8-17号新闻，今晨有雨，注意带伞!!!");
        tjutNoteObservable.setNote("通告，开学日期为8-29!!! 请同学们及时购票");
    }
}
